package com.example.testjenkins.config;

import io.swagger.v3.oas.models.ExternalDocumentation;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SwaggerConfiguration {

    @Bean
    public OpenAPI openAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("EPAM Test API")
                        .description("EPAM测试Jenkins的API.")
                        .version("1.0")
                        .license(new License()
                                .name("License1")
                                .url("http://springdoc.org")))
                .externalDocs(new ExternalDocumentation()
                        .description("externalDocs1")
                        .url("https://www.baidu.com"));
    }
}
